home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
network
/
samba
/
patches
/
samba-1.034
/
samba-1
Wrap
Text File
|
1995-09-21
|
5KB
|
160 lines
diff -u -r --new-file last-version/source/change-log samba-1.9.14/source/change-log
--- last-version/source/change-log Thu Sep 21 20:57:12 1995
+++ samba-1.9.14/source/change-log Fri Sep 22 10:39:15 1995
@@ -1417,7 +1417,7 @@
by lydick@cvpsun104.csc.ti.com (Dan Lydick))
-1.9.14:
+1.9.14: 22/9/95
- fixed up level 3 and 4 trans2 requests for OS/2
- minor optimisations in a few places
- cleaned up the closing of low fds a bit
@@ -1588,6 +1588,8 @@
- sunos5 patch from Niels.Baggesen@uni-c.dk
- more japanese extensions patches from fujita@ainix.isac.co.jp
- released alpha20
+ - added force_user to conn struct
+
==========
todo:
@@ -1627,4 +1629,6 @@
---
ALLOW_PASSWORD_CHANGE only compiles/works on some systems
+---
+weird foooooooo/open.exe bug on NT
diff -u -r --new-file last-version/source/password.c samba-1.9.14/source/password.c
--- last-version/source/password.c Tue Sep 19 14:48:12 1995
+++ samba-1.9.14/source/password.c Fri Sep 22 10:37:06 1995
@@ -779,7 +779,7 @@
/****************************************************************************
check if a username is valid
****************************************************************************/
-static BOOL user_ok(char *user,int snum)
+BOOL user_ok(char *user,int snum)
{
pstring valid, invalid;
BOOL ret;
@@ -875,7 +875,8 @@
/****************************************************************************
check for authority to login to a service with a given username/password
****************************************************************************/
-BOOL authorise_login(int snum,char *user,char *password, int pwlen, BOOL *guest,int vuid)
+BOOL authorise_login(int snum,char *user,char *password, int pwlen,
+ BOOL *guest,BOOL *force,int vuid)
{
BOOL ok = False;
@@ -897,6 +898,8 @@
if the service is guest_only then steps 1 to 5 are skipped
*/
+ if (GUEST_ONLY(snum)) *force = True;
+
if (!(GUEST_ONLY(snum) && GUEST_OK(snum)))
{
@@ -1010,6 +1013,7 @@
else
DEBUG(0,("Invalid guest account %s??\n",guestname));
*guest = True;
+ *force = True;
}
if (ok && !user_ok(user,snum))
diff -u -r --new-file last-version/source/server.c samba-1.9.14/source/server.c
--- last-version/source/server.c Thu Sep 21 20:49:48 1995
+++ samba-1.9.14/source/server.c Fri Sep 22 10:39:21 1995
@@ -1596,13 +1596,15 @@
snum = Connections[cnum].service;
- if (lp_security() == SEC_SHARE || (*lp_force_user(snum))) {
+ if (Connections[cnum].force_user ||
+ lp_security() == SEC_SHARE ||
+ !(vuser = get_valid_user_struct(uid)) ||
+ !user_ok(vuser->name,snum)) {
uid = Connections[cnum].uid;
gid = Connections[cnum].gid;
groups = Connections[cnum].groups;
ngroups = Connections[cnum].ngroups;
} else {
- vuser = get_valid_user_struct(uid);
if (!vuser) {
DEBUG(2,("Invalid vuid used %d\n",uid));
return(False);
@@ -2288,6 +2290,7 @@
struct passwd *pass = NULL;
connection_struct *pcon;
BOOL guest = False;
+ BOOL force = False;
static BOOL first_connection = True;
strlower(service);
@@ -2347,7 +2350,7 @@
add_session_user(service);
/* shall we let them in? */
- if (!authorise_login(snum,user,password,pwlen,&guest,vuid))
+ if (!authorise_login(snum,user,password,pwlen,&guest,&force,vuid))
{
DEBUG(2,("%s invalid username/password for %s\n",timestring(),service));
return(-1);
@@ -2389,7 +2392,7 @@
else
pcon->admin_user = False;
-
+ pcon->force_user = force;
pcon->uid = pass->pw_uid;
pcon->gid = pass->pw_gid;
pcon->num_files_open = 0;
@@ -2427,7 +2430,8 @@
pcon->uid = pass2->pw_uid;
string_set(&pcon->user,fuser);
strcpy(user,fuser);
- DEBUG(3,("Forced user %s\n",fuser));
+ pcon->force_user = True;
+ DEBUG(3,("Forced user %s\n",fuser));
}
else
DEBUG(1,("Couldn't find user %s\n",fuser));
diff -u -r --new-file last-version/source/smb.h samba-1.9.14/source/smb.h
--- last-version/source/smb.h Thu Sep 21 20:58:15 1995
+++ samba-1.9.14/source/smb.h Fri Sep 22 10:35:42 1995
@@ -251,6 +251,7 @@
typedef struct
{
int service;
+ BOOL force_user;
int uid; /* uid of user who *opened* this connection */
int gid; /* gid of user who *opened* this connection */
void *dirptr;
@@ -561,6 +562,7 @@
};
/* and a few prototypes */
+BOOL user_ok(char *user,int snum);
int sys_rename(char *from, char *to);
int sys_select(fd_set *fds,struct timeval *tval);
int sys_unlink(char *fname);
@@ -681,7 +683,8 @@
int reply_trans2(char *inbuf,char *outbuf,int length,int bufsize);
int reply_trans(char *inbuf,char *outbuf);
char *ufc_crypt(char *key,char *salt);
-BOOL authorise_login(int snum,char *user,char *password, int pwlen, BOOL *guest,int vuid);
+BOOL authorise_login(int snum,char *user,char *password, int pwlen,
+ BOOL *guest,BOOL *force,int vuid);
void add_session_user(char *user);
int valid_uid(int uid);
user_struct *get_valid_user_struct(int uid);
diff -u -r --new-file last-version/source/version.h samba-1.9.14/source/version.h
--- last-version/source/version.h Thu Sep 21 21:06:09 1995
+++ samba-1.9.14/source/version.h Fri Sep 22 10:40:47 1995
@@ -1 +1 @@
-#define VERSION "1.9.14alpha20"
+#define VERSION "1.9.14"